﻿using Basic.FlowGatewayModule.Interface;
using RpcStore.RemoteModel.ServerBind;
using RpcStore.RemoteModel.ServerBind.Model;
using WeDonekRpc.Client;
using WeDonekRpc.Model;

namespace Basic.FlowGatewayModule.Extend
{
    internal class ServerGroupService : IServerGroupService
    {
        public BindServerGroupType[] Gets ( RpcServerType serverType )
        {
            return new GetBindServerGroupType
            {
                Param = new BindGetParam
                {
                    RpcMerId = RpcClient.CurrentSource.RpcMerId,
                    ServerType = serverType
                }
            }.Send();
        }
        public ServerItemDto[] GetServers ( RpcServerType serverType )
        {
            return new GetBindServers
            {
                RpcMerId = RpcClient.CurrentSource.RpcMerId,
                ServerType = serverType
            }.Send();
        }
    }
}
